function visLatticeFile(filename)
%VISLATTICEFILE Summary of this function goes here
%   Detailed explanation goes here
    hd = fopen(filename, 'r');
    type = fscanf(hd, '%c', 1);
    D = fscanf(hd, '%d', 1);
    n = fscanf(hd, '%d', 1);
    q = fscanf(hd, '%d', [1 D]);
    center = fscanf(hd, '%f', [1 D]);
    radius = fscanf(hd, '%f', [1 D]);
    theta = fscanf(hd, '%f', 1);
    numCases = fscanf(hd, '%d', 1);
    M = fscanf(hd, '%d');
    M = reshape(M, numel(M)/numCases, []);
    if D == 2
        for i=1:numCases
            visLattice2D(D, n, q, center, radius, theta, M(:,i), type);
        end
    elseif D == 3
        for i=1:numCases
            visLattice3D(D, n, q, center, radius, theta, M(:,i), type);
        end
    end
    fclose(hd);
end

